package com.bolang.onlycode;

import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.SimpleChannelInboundHandler;

public class NettyClientHandler extends SimpleChannelInboundHandler<String> {
    // 重写 channelRead0() 方法处理服务端发送的消息
    @Override
    protected void channelRead0(ChannelHandlerContext ctx, String msg) throws Exception {
        System.out.println("收到服务端消息：" + msg);
        // TODO: 处理收到的消息
    }

    // ...
}

